<?php
/**
 * @author 	 	 faithsmine@gmail.com
 * @copyright		 www
 * @version		 1.0
 * @name 		 index.php
 * @todo 		 user home page
 * @final 		 2009-09-11
 */
define('IN_YCTOOL', true);//定义该文件合法性
require_once('config.php');
require_once(DIR_COMM . 'common.php');
if ($user->userinfo['userid'] > 0)
{
    func::obHeader('./admin/');
    exit();
}

//首页645X396
$rslist[99] = db::getLimit(DB_TABLEPRE . 'web_info', '*', ' active <> -1 AND active = 99 AND type = 3 ORDER BY infoid DESC', 1, 10);
//首页 广告 
$rslist[2] = db::getLimit(DB_TABLEPRE . 'web_info', '*', ' active <> -1 AND type = 2 ORDER BY active DESC, infoid DESC', 1, 5);
//首页 新闻
$rslist[1] = db::getLimit(DB_TABLEPRE . 'web_info', '*', ' active <> -1 AND type = 1 ORDER BY active DESC, infoid DESC', 1, 5);


require_once DIR_COMM.'template.func.php';
require_once tpl('index.html', $tpldir);
exit;
?>
